package com.woniuxy.user.service.impl;

import com.woniuxy.commons.entity.UserLike;
import com.woniuxy.user.mapper.UserLikeMapper;
import com.woniuxy.user.service.UserLikeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author:阳佳
 * @Date: 2020/7/19 12:03
 * @Description:
 * @PACKAGE_NAME:com.woniuxy.user.service.impl
 */
@Service
public class UserLikeServiceImpl implements UserLikeService {
    @Autowired
    private UserLikeMapper userLikeMapper;

    @Override
    public int addLikeRecord(UserLike userLike) {
        return userLikeMapper.addLikeRecord(userLike);
    }

    @Override
    public int delLikeRecordByCidAndUid(String uid, String cid) {
        return userLikeMapper.delLikeRecordByCidAndUid(uid, cid);
    }


    @Override
    public int courseLikeCountByCid(String cid) {
        return userLikeMapper.courseLikeCountByCid(cid);
    }

    @Override
    public UserLike findCourseLikeRecordByCidAndUid(String cid, String uid) {
        return userLikeMapper.findCourseLikeRecordByCidAndUid(cid, uid);
    }


}
